const http = uni.$u.http

// // post请求，获取菜单
// export const postMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)

// // get请求，获取菜单，注意：get请求的配置等，都在第二个参数中，详见前面解释
// export const getMenu = (data) => http.get('/ebapi/public_api/index', data)

export const PostDelCart = (params, config = {}) => http.post('/api/cart/del', params, config)
export const CollectCart = (params, config = {}) => http.post('/api/collect/all', params, config)

export const GetCartList = (data) => http.get('/api/cart/list', data)
export const GetColleceList = (data) => http.get('/api/collect/user', data)

export const GetDefaultAddress = () => http.get('/api/address/default')
export const GetAddressList = (data) => http.get('/api/address/list', data)
export const GetAddressDetail = (id) => http.get(`/api/address/detail/${id}`)

export const check_shipping = (params, config = {}) => http.post('/api/order/check_shipping', params, config)
export const comfirm = (params, config = {}) => http.post('/api/order/confirm', params, config)